package com.ruoyi.system.enums;

public enum LabelEnum {

    LABEL1("1","品牌"),
    LABEL2("2","放心兑"),
    LABEL3("3","七天无理由");

    private String code;

    private String name;

    LabelEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByCode(String code){
        for (LabelEnum value : LabelEnum.values()) {
            if (value.getCode().equals(code)){
                return value.getName();
            }
        }
        return null;
    }
}
